﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace BroRPG.GameComponents
{
   public class Player : Sprite
    {

        public Player(String spritesheet, String texture) 
            : base(spritesheet,texture)
        {
        }

        public Player(String spritesheet, String texture, Vector2 position)
            : base(spritesheet, texture,position)
        {
        }

        public override void Draw(Microsoft.Xna.Framework.GameTime gameTime, float ambientPercent, Microsoft.Xna.Framework.Color ambientColor)
        {
            Constants.SpritebatchBegin(ambientPercent, _light, MaterialColor, ambientColor, _lightColor, Alpha);
            Constants.Spritebatch.Draw(
                Constants.SpriteSheets[_spritesheet].Texture,
                new Rectangle(400,
                              300,
                              Constants.SpriteSheets[_spritesheet].SourceRectangle(_texture).Width,
                              Constants.SpriteSheets[_spritesheet].SourceRectangle(_texture).Height),
                Constants.SpriteSheets[_spritesheet].SourceRectangle(_texture),
                Color.White,
                rotation,
                Origin,
                SpriteEffects.None,
                0.0f);
            Constants.SpritebatchEnd();
        }
    }
}
